//
//  NgSliderCollectionViewCell.m
//  NgTopOSShove
//
//  Created by yscompany on 2018/11/21.
//  Copyright © 2018 NgTopOS. All rights reserved.
//

#import "NgSliderCollectionViewCell.h"

@interface NgSliderCollectionViewCell ()
@property (nonatomic, strong) UILabel *titleLab; //当前item标题
@end

@implementation NgSliderCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        [self setSubviews];
    }
    return self;
}

- (void)setSubviews {
    self.backgroundColor = [UIColor whiteColor];
    self.titleLab.frame = CGRectMake(0, (CGRectGetHeight(self.frame) - 15) / 2, CGRectGetWidth(self.frame), 15);
    [self addSubview:self.titleLab];
}
- (void)configureInfo:(NSDictionary *)infoDict {
    self.titleLab.text = [HDVerfiyTools getSafeString:[infoDict objectForKey:@"title"]];
}
- (void)configureTitle:(NSString *)titleStr {
    self.titleLab.text = [HDVerfiyTools getSafeString:titleStr];
}
- (UILabel *)titleLab {
    if (!_titleLab) {
        _titleLab = [UILabel new];
        _titleLab.textColor = [UIColor blackColor];
        _titleLab.font = [UIFont systemFontOfSize:15];
        _titleLab.numberOfLines = 0;
        _titleLab.textAlignment = NSTextAlignmentCenter;
    }
    return _titleLab;
}
@end
